﻿using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;
using System.Windows.Media;
using System.Collections.ObjectModel;

namespace ImmlPad.Documents
{
    public interface IDocument
    {
        event PropertyChangedEventHandler PropertyChanged;
        event EventHandler<EventArgs> DocumentModifiedExternally;
        event EventHandler<EventArgs> DocumentDeletedExternally;

        /// <summary>
        /// A collection of the elements available in this document. A element represents an XML element.
        /// </summary>
        List<DocumentElement> Elements { get; set; }

        bool EnableRenderedView { get; set; }
        ImageSource PreviewImage { get; set; }
        string BackupPath { get; }
        string FullPath { get; set; }
        string FoldingStates { get; set; }
        bool UsingTemporaryFilename { get; }
        bool NeedsSave { get; }
        bool NeedsReload { get; }

        string SourceText { get; set; }
        string TemporaryFilename { get; }
        string Filename { get; }
        string Folder { get; }

        bool SaveAs(string fullPath);
        bool Save();
        bool SaveBackup();
        void DeleteBackup();

        void Reload();
    }
}
